package com.umeox.watch.moto.dataservice.mqtt.request;


import com.alibaba.fastjson.JSONObject;
import com.umeox.moto.mqtt.request.MqttPublishRequest;
import com.umeox.watch.moto.dataservice.base.BaseApp;

/**
 * 属性上报封装
 */
public class ClientAttributeRequest extends MqttPublishRequest {

    public ClientAttributeRequest(String topic, JSONObject params) {
        this.requestId = BaseApp.getInstance().createRequestId();
        this.topic = topic + requestId;
        this.qos = 0;
        this.payloadObj = params.toString();
        this.replyTopic = topic.substring(0,topic.lastIndexOf("/")) + "_reply/" + requestId;
    }
}
